\hypertarget{sensors_8h}{
\section{atmega1281/mid/include/sensors.h File Reference}
\label{sensors_8h}\index{atmega1281/mid/include/sensors.h@{atmega1281/mid/include/sensors.h}}
}
{\ttfamily \#include \char`\"{}structures.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}ir.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}bumpers.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}adc.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}sonar.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}dio.h\char`\"{}}\par
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{group__nxbot__sensors_ga1a0d280534953662003acd91f20071c1}{BATT\_\-READ\_\-VOLT}~0
\begin{DoxyCompactList}\small\item\em constant definition for battery\_\-read \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sensors_ga61262b004f6813b955f4d0b2d6553817}{BATT\_\-READ\_\-PERC}~1
\begin{DoxyCompactList}\small\item\em constant definition for battery\_\-read \item\end{DoxyCompactList}\item 
\#define \hyperlink{group__nxbot__sensors_ga4ab82b3d018ff6e6866549a065188a30}{sensors\_\-getIR}()~ir\_\-read()
\item 
\#define \hyperlink{group__nxbot__sensors_ga704680c481c946bf98aeb484c46f30e0}{sensors\_\-getBumpers}()~bumpers\_\-read()
\item 
\#define \hyperlink{group__nxbot__sensors_gada5c769ceb7d8b75c54cf90ab4e748f7}{sensors\_\-getBattState}()~battery\_\-read(BATT\_\-READ\_\-PERC)
\item 
\#define \hyperlink{group__nxbot__sensors_ga709d68c36da1e3f2b5feec8c76ed9243}{sensors\_\-getBattVoltage}()~battery\_\-read(BATT\_\-READ\_\-VOLT)
\item 
\#define \hyperlink{group__nxbot__sensors_ga843e7932aafddffd58c4e7f2d4065bca}{sensors\_\-getSonar}(x, y, s)~sonar\_\-read(x,y,s)
\item 
\#define \hyperlink{group__nxbot__sensors_ga21d87617d11c161caa395ce84f987e71}{sensors\_\-setSonar}(x, u)~sonar\_\-write(x,u)
\item 
\#define \hyperlink{group__nxbot__sensors_ga756d8a8a2ba732eb8d918b48108bf034}{sensors\_\-getADCRead}(channel)~adc\_\-read(channel)
\item 
\#define \hyperlink{group__nxbot__sensors_gaa04e94731b959482fa4a5918529c9e16}{sensors\_\-setADCChannel}(channel)~adc\_\-setChannel(channel)
\item 
\#define \hyperlink{group__nxbot__sensors_ga4f69888f0b0485e1c303c271272dbecf}{sensors\_\-getDIO}()~dio\_\-read()
\item 
\#define \hyperlink{group__nxbot__sensors_ga3fece7b941ca3f7239a55747bd02ce48}{sensors\_\-setDIO}(val)~dio\_\-write(val)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__nxbot__sensors_gabfbbfb986d008991dbbe32035cbdcde6}{battery\_\-init} (void)
\begin{DoxyCompactList}\small\item\em Hardware initialization for the battery module. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__sensors_gabf908968d26d8f291a60846d6dd51251}{battery\_\-ledEnable} (unsigned char en)
\begin{DoxyCompactList}\small\item\em Function used to write the state of the battery-\/LED, located in the rear of NXBot. \item\end{DoxyCompactList}\item 
unsigned char \hyperlink{group__nxbot__sensors_gaa4799455728e1873e05d8bbe460d03fc}{battery\_\-getState} (void)
\begin{DoxyCompactList}\small\item\em Reads the state of the battery, in \mbox{[}\%\mbox{]} units. \item\end{DoxyCompactList}\item 
unsigned int \hyperlink{group__nxbot__sensors_gada2d7b272290fee99245113b1c134a20}{battery\_\-getVoltage} (void)
\begin{DoxyCompactList}\small\item\em Reads the state of the battery, in \mbox{[}V\mbox{]} units. \item\end{DoxyCompactList}\item 
unsigned int \hyperlink{group__nxbot__sensors_gaec4ef3b620c24ee1c4ea58e26fe93cb3}{battery\_\-read} (unsigned char type)
\begin{DoxyCompactList}\small\item\em Read the state of the battery, wether voltage or percentage. \item\end{DoxyCompactList}\item 
void \hyperlink{group__nxbot__sensors_gafbed7bde16bf6f2535f0792084773b17}{sensors\_\-readAll} (\hyperlink{structsensors__t}{sensors\_\-t} $\ast$sens)
\item 
void \hyperlink{group__nxbot__sensors_gac5ec1d578591899e43c3515d05e573b7}{sensors\_\-init} (void)
\end{DoxyCompactItemize}
